<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
  /*function product(num1,num2){
    var result=num1*num2;
    return result;
  }
  var a=product(5,7);
  console.log("乘积为："+a);*/


var rade="";
    function num(){
        for(var i=0;i<4;i++){
        var b=Math.floor(Math.random()*10);
        rade+=b;
    }
    return rade;
}
var a=num();
console.log("四位随机验证码："+a);
</script>
</html>